package com.ys.filelib.filedialog.loader;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class Executor {

    private final static Executor mInstance = new Executor();

    private final int COUNT = 16;
    ExecutorService executor = Executors.newFixedThreadPool(COUNT);

    public static void execute(Runnable runnable) {
        mInstance.executor.execute(runnable);
    }

    public static Future<?> submit(Runnable runnable) {
        return mInstance.executor.submit(runnable);
    }

}
